<template>
	<view>
		<block v-for="(item, itemIndex) in diyItems" :key="itemIndex">
			<block v-if="item.type === 'search'">
				<!-- 搜索框 -->
				<diy-search :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-search>
			</block>
			<block v-if="item.type === 'banner'">
				<!-- banner轮播 -->
				<diy-banner :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params" :dataList="item.data"></diy-banner>
			</block>
			<block v-if="item.type === 'imageSingle'">
				<!-- 单图组 -->
				<diy-image-single :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-image-single>
			</block>
			<block v-if="item.type === 'video'">
				<!-- 视频组 -->
				<diy-video :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-video>
			</block>
			<block v-if="item.type === 'article'">
				<!-- 文章组 -->
				<diy-article :itemIndex="itemIndex" :params="item.params" :dataList="item.data"></diy-article>
			</block>
			<block v-if="item.type === 'special'">
				<!-- 头条快报 -->
				<diy-special :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params" :dataList="item.data"></diy-special>
			</block>
			<block v-if="item.type === 'notice'">
				<!-- 公告组 -->
				<diy-notice :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-notice>
			</block>
			<block v-if="item.type === 'blank'">
				<!-- 空白组 -->
				<diy-blank :itemIndex="itemIndex" :itemStyle="item.style"></diy-blank>
			</block>
			<block v-if="item.type === 'guide'">
				<!-- 辅助线 -->
				<diy-guide :itemIndex="itemIndex" :itemStyle="item.style"></diy-guide>
			</block>
			<block v-if="item.type === 'service'">
				<!-- 辅助线 -->
				<diy-service :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-service>
			</block>
			<block v-if="item.type === 'richText'">
				<!-- 富文本 -->
				<diy-rich-text :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-rich-text>
			</block>
			<block v-if="item.type === 'navBar'">
				<!-- 富文本 -->
				<diy-nav-bar :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-nav-bar>
			</block>
			<block v-if="item.type === 'window'">
				<!-- 富文本 -->
				<diy-window :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-window>
			</block>
			<block v-if="item.type === 'goods'">
				<!-- 商品组 -->
				<diy-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-goods>
			</block>
			<block v-if="item.type === 'coupon'">
				<!-- 优惠券 -->
				<diy-coupon :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-coupon>
			</block>
			<!--  -->
			<block v-if="item.type === 'sharingGoods'">
				<!-- 拼团商品 -->
				<diy-sharing-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-sharing-goods>
			</block>
			<block v-if="item.type === 'bargainGoods'">
				<!-- 砍价商品 -->
				<diy-bargain-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-bargain-goods>
			</block>

			<block v-if="item.type === 'sharpGoods'">
				<!-- 秒杀商品 -->
				<diy-sharp-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataObject="item.data"></diy-sharp-goods>
			</block>
			<block v-if="item.type === 'shop'">
				<!-- 门店组 -->
				<diy-shop :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-shop>
			</block>
		</block>
	</view>
</template>

<script>
import diySearch from '@/components/diy/search/search.vue';
import diyBanner from '@/components/diy/banner/banner.vue';
import diyImageSingle from '@/components/diy/imageSingle/imageSingle.vue';
import diyVideo from '@/components/diy/video/video.vue';
import diyArticle from '@/components/diy/article/article.vue';
import diySpecial from '@/components/diy/special/special.vue';
import diyNotice from '@/components/diy/notice/notice.vue';
import diyBlank from '@/components/diy/blank/blank.vue';
import diyGuide from '@/components/diy/guide/guide.vue';
import diyService from '@/components/diy/service/service.vue';
import diyRichText from '@/components/diy/richText/richText.vue';
import diyNavBar from '@/components/diy/navBar/navBar.vue';
import diyWindow from '@/components/diy/window/window.vue';
import diyGoods from '@/components/diy/goods/goods.vue';
import diyCoupon from '@/components/diy/coupon/coupon.vue';
import diyShop from '@/components/diy/shop/shop.vue';
import diyBargainGoods from '@/components/diy/bargainGoods/index.vue';
import diySharpGoods from '@/components/diy/sharpGoods/index.vue';
import diySharingGoods from '@/components/diy/sharingGoods/index.vue';
export default {
	components: {
		diySearch,
		diyBanner,
		diyImageSingle,
		diyVideo,
		diyArticle,
		diySpecial,
		diyNotice,
		diyBlank,
		diyGuide,
		diyService,
		diyRichText,
		diyNavBar,
		diyWindow,
		diyGoods,
		diyCoupon,
		diyShop,
		diySharpGoods,
		diyBargainGoods,
		diySharingGoods
	},
	props: {
		diyItems: {
			type: Object
		}
	},
	data() {
		return {};
	},
	mounted() {},
	methods: {}
};
</script>

<style></style>
